package com.atguigu.spring.aop.impl;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;
//声明为ioc容器
//把类声明为切面
@Aspect
@Component
public class LogingAspect {
	//声明该方法是前置通知
	  @Before("execution(public int com.atguigu.spring.aop.impl.ArithMeticCaculatorImpl.add(int, int))")
      public void beforeMethod(){
    	  System.out.println("the method begins");
      }
      public void afterMethod(){
    	  System.out.println("the method after");
      }
}
